<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ tag body-content="empty"%>
<%@ attribute name="attrPath" required="true" rtexprvalue="false" type="java.lang.String" description="即columnName，对应的搜索field的HQL，例如:s.brandName"%>
<%@ attribute name="attrNameKey" required="true" rtexprvalue="false" type="java.lang.String" description="搜索filed的I18N key"%>
<%@ attribute name="datatype" required="true" rtexprvalue="false" type="java.lang.String" description="搜索field的数据类型，支持:String,Integer,Short,BigDecimal,Date,Date_Begin,Date_End"%>
<%@ attribute name="operator" required="true" rtexprvalue="false" type="java.lang.String" description="搜索field的操作子:支持：EQ,LIKE,NOT,GTE,GT,LTE,LT"%>
<%@ attribute name="style" required="false" rtexprvalue="false" type="java.lang.String" description="搜索field input 的style属性"%>
<%@ attribute name="classes" required="false" rtexprvalue="false" type="java.lang.String" description="搜索field input 的class属性"%>
<%@ attribute name="size" required="false" rtexprvalue="false" type="java.lang.String" description="搜索field input 的size属性"%>
<%@ attribute name="labelWidth" required="false" rtexprvalue="false" type="java.lang.String" description="th的宽度"%>
<%@ attribute name="validConf" required="false" type="java.lang.String" description="客户端验证validConf属性"%>
<%@ attribute name="onenter" required="false" type="java.lang.String" description="是否回车触发搜索事件,如果等于true则触发"%>
<%@ attribute name="id" required="false" type="java.lang.String" description="input标签的id值，适用于阶段性日期的搜索，配合ui_datePicker"%>
<c:set var="attrName">COL@${attrPath}@${datatype}@${operator}</c:set>
<c:if test="${empty validConf}">
	<c:if test="${datatype=='Integer'}"><c:set var="validConf">integer</c:set></c:if>
	<c:if test="${datatype=='Short'}"><c:set var="validConf">short</c:set></c:if>
</c:if>

<tr>
	<th width="${labelWidth}"><label for="${attrName}"><fmt:message key="${attrNameKey}"/>:</label></th>
	<td>
		<input type="text" id="${id!=null?id:attrName}" name="${attrName}" 
				value="${sc==null?requestScope[attrName]:sc.param[attrName]}" 
				<c:if test="${not empty style}">style="${style}"</c:if> 
				<c:if test="${not empty classes}">class="${classes}"</c:if> 
				<c:if test="${not empty size}">size="${size}"</c:if>
				<c:if test="${not empty validConf}"> validConf="${validConf}" onblur="validateEventHandler();"</c:if> 
				<c:if test='${onenter == "true"}'>onkeyup="doSearchHandlerWhenEnter(event)"</c:if>/>&nbsp;
	</td>
</tr>